home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
xset402.zip
/
PATCH.DOS
< prev
next >
Wrap
Text File
|
1994-03-29
|
2KB
|
44 lines
Patching COMMAND.COM default environment size
=============================================
The default environment size for a new COMMAND.COM being loaded is hardcoded
in the COMMAND.COM program and is in most of the case largely insufficient.
Here is the way to change this value.
The presented sections of code are from MS-DOS 5.00 dis-assembled with DEBUG
so that those with other versions of DOS find the offsets for their
COMMAND.COM. In other DOS versions, the section of code to be patched is
unchanged, it is simply shifted in position so it's just a question of
locating the correct offsets by searching for strings of bytes from the
sections of code listed below. The main trick here is to avoid addresses in
the code which are likely to be different (most absolute addresses will be
different while relative addresses may or may not be different). Assuming
you're handy with DEBUG or a similar debugger and know some 8088 assembly,
you should be able to pull it off. If DEBUG's search command is too limited,
you might try Unassembling the whole COMMAND.COM to a text file and using an
editor or lister utility to search.
ENVIRONMENT SIZE: Search for '10 00' for other DOS versions than 5.0
-u 165b
1111:165B 58 POP AX
1111:165C C706C01E5100 MOV WORD PTR [1EC0],0051
1111:1662 C706BE1E1000 MOV WORD PTR [1EBE],0010 <<default envir. size>>
1111:1668 BAD498 MOV DX,98D4
1111:166B B104 MOV CL,04
1111:166D D3EA SHR DX,CL
1111:166F 8916CE1E MOV [1ECE],DX
1111:1673 2BC2 SUB AX,DX
1111:1675 A39802 MOV [0298],AX
1111:1678 A12C00 MOV AX,[002C]
So, to change your default environment size to 1280, type:
DEBUG COMMAND.COM
-E 1666 50 00
-W
-Q